package o;

import java.util.Arrays;
import o.aea.a;

public final class adt implements aea {
    public final long[] ˊ;
    public final int[] ˋ;
    public final int ˎ;
    public final long[] ˏ;
    public final long[] ॱ;
    private final long ᐝ;

    public adt(int[] iArr, long[] jArr, long[] jArr2, long[] jArr3) {
        this.ˋ = iArr;
        this.ˏ = jArr;
        this.ˊ = jArr2;
        this.ॱ = jArr3;
        this.ˎ = iArr.length;
        if (this.ˎ > 0) {
            this.ᐝ = jArr2[this.ˎ - 1] + jArr3[this.ˎ - 1];
        } else {
            this.ᐝ = 0;
        }
    }

    public int ॱ(long j) {
        return anr.ˊ(this.ॱ, j, true, true);
    }

    public boolean ˊ() {
        return true;
    }

    public long g_() {
        return this.ᐝ;
    }

    public a ˏ(long j) {
        int ॱ = ॱ(j);
        aeh o_aeh = new aeh(this.ॱ[ॱ], this.ˏ[ॱ]);
        if (o_aeh.ˊ >= j || ॱ == this.ˎ - 1) {
            return new a(o_aeh);
        }
        return new a(o_aeh, new aeh(this.ॱ[ॱ + 1], this.ˏ[ॱ + 1]));
    }

    public String toString() {
        return "ChunkIndex(length=" + this.ˎ + ", sizes=" + Arrays.toString(this.ˋ) + ", offsets=" + Arrays.toString(this.ˏ) + ", timeUs=" + Arrays.toString(this.ॱ) + ", durationsUs=" + Arrays.toString(this.ˊ) + ")";
    }
}
